package com.google.enterprise.gsa.commerce;

import java.util.HashMap;

public class OneBoxResult {
	
	private String title = null;
	private HashMap<String,String> kvpairs = new HashMap<String,String>();
	private boolean is_redirect = false;
	private boolean is_promotion = false;

	public void setTitle(String title)
	{
		this.title = title;
		if (title.equalsIgnoreCase("redirect"))
			this.is_redirect = true;
		if (title.equalsIgnoreCase("promotion"))
			this.is_promotion = true;		
	}
	
	public boolean isRedirect()
	{
		return this.is_redirect;
	}
	
	public boolean isPromotion()
	{
		return this.is_promotion;
	}
		
	public String getTitle()
	{
		return this.title;
	}
	
	public void addKVPair(String key, String value)
	{
		kvpairs.put(key, value);
	}
	
	public HashMap<String,String> getKVParis()
	{
		return kvpairs;
	}
}
